const { defineConfig } = require("@vue/cli-service");
const path = require("path");
module.exports = defineConfig({
  chainWebpack: (config) => {
    config.module
      .rule("js")
      .use("babel-loader")
      .tap((options) => {
        return {
          ...options,
          cacheDirectory: path.resolve(
            __dirname,
            "../node_modules/.cache/babel"
          ), // 指定缓存路径
          cacheCompression: false, // 可选：关闭缓存文件压缩
        };
      });
  },
  transpileDependencies: true,
  configureWebpack: {
    resolve: {
      alias: {
        "@": path.resolve(__dirname, "../../node_modules"),
      },
    },
  },
});
